Skip to content
This repository was archived by the owner on Sep 16, 2025. It is now read-only.

Allow the transformer middleware for individual content types for plu…#105

Open
kevinvugts wants to merge 1 commit intostrapi-community:masterfrom
kevinvugts:patch-1
Open

Allow the transformer middleware for individual content types for plu…#105
kevinvugts wants to merge 1 commit intostrapi-community:masterfrom
kevinvugts:patch-1

Conversation

@kevinvugts
Copy link
Copy Markdown

…gins

This adds support for allowing individual content-types to be transformed by the transformer middleware.

Example config:

    enabled: true,
    config: {
      responseTransforms: {
        removeAttributesKey: true,
        removeDataKey: true,
      },
      contentTypeFilter: {
        mode: "allow",
        uids: {
          "api::blog.blog": true,
        },
      },
      plugins: {
        mode: "allow",
        ids: {
          "some-plugin": {
            mode: "allow",
            uids: {
              "plugin::some-plugin.some-content-type": true,
            },
          },
        },
      },
    },
  },```

…gins

This adds support for allowing individual content-types to be transformed by the transformer middleware.

Example config:

```transformer: {
    enabled: true,
    config: {
      responseTransforms: {
        removeAttributesKey: true,
        removeDataKey: true,
      },
      contentTypeFilter: {
        mode: "allow",
        uids: {
          "api::blog.blog": true,
        },
      },
      plugins: {
        mode: "allow",
        ids: {
          "some-plugin": {
            mode: "allow",
            uids: {
              "plugin::some-plugin.some-content-type": true,
            },
          },
        },
      },
    },
  },```
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant